package cn.gdsdxy.s02mybatis;


import cn.gdsdxy.s02mybatis.entity.Comment;
import cn.gdsdxy.s02mybatis.repository.CommentMapper3;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class CommentTest3 {
    @Autowired
    CommentMapper3 commentMapper3;


    @Test
    void addComment(){
        Comment comment =new Comment(0,"一般","zhanghua");
        if(commentMapper3.insertComment(comment)>0);
        System.out.println("添加成功");
        System.out.println("添加的元素的id值为"+comment.getId());
    }
}
